
import {
  useSelector as useReduxSelector,
  TypedUseSelectorHook,
} from 'react-redux'
import { RouterState } from 'connected-react-router'
import { AuthState } from '../store/reducers/auth.reducer'
import { CategoryState } from '../store/reducers/category.reducer'
import { ProductState } from '../store/reducers/product.reducer'
// 自定义useSelector
export type RootState = {
  router: RouterState,
  auth: AuthState,
  category: CategoryState,
  product: ProductState
}

export const useSelector: TypedUseSelectorHook<RootState> = useReduxSelector